package com.bstek.pms.tools.model;

import java.io.Serializable;

/**
 * 列信息
 */
public class ColumnInfo implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 字段名
     */
    private String name;

    /**
     * 字段注释
     */
    private String label;
    /**
     * 数据类型
     */
    private String dataType;

    /**
     * 是否为空
     */
    private boolean nullable;
    /**
     * 字符串长度
     */
    private int length;
    /**
     * 数值型长度
     */
    private int precision;
    /**
     * 数值型精度
     */
    private int scale;
    /**
     * 字段约束名
     */
    private String constraintsName;
    /**
     * 字段约束类型
     */
    private String constraintsType;

    public  ColumnInfo(){

    }
    public  ColumnInfo(String name,String label,String dataType){
        this.name=name;
        this.label=label;
        this.dataType=dataType;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public boolean isNullable() {
        return nullable;
    }

    public void setNullable(boolean nullable) {
        this.nullable = nullable;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }

    public int getPrecision() {
        return precision;
    }

    public void setPrecision(int precision) {
        this.precision = precision;
    }

    public int getScale() {
        return scale;
    }

    public void setScale(int scale) {
        this.scale = scale;
    }

    public String getConstraintsName() {
        return constraintsName;
    }

    public void setConstraintsName(String constraintsName) {
        this.constraintsName = constraintsName;
    }

    public String getConstraintsType() {
        return constraintsType;
    }

    public void setConstraintsType(String constraintsType) {
        this.constraintsType = constraintsType;
    }

    @Override
    public String toString() {
        return "ColumnInfo{" +
                "name='" + name + '\'' +
                ", label='" + label + '\'' +
                ", dataType='" + dataType + '\'' +
                ", nullable=" + nullable +
                ", length=" + length +
                ", precision=" + precision +
                ", scale=" + scale +
                ", constraintsName='" + constraintsName + '\'' +
                ", constraintsType='" + constraintsType + '\'' +
                '}';
    }
}
